<?php

namespace app\webapi\vms\validate;

use app\webapi\common\BaseValidate;

/**
 * @模板验证类
 */
class TemplateValidate extends BaseValidate
{
    //验证规则
    protected $rule = [
        'page_no' => 'require|number',
        'page_size' => 'require|number',
        'id' => 'require|number'
    ];

    //验证消息
    protected $message = [
        'page_no.require' => '页码必填',
        'page_no.number' => '页码参数必须是整数类型',
        'page_size.require' => '每页显示条目数必填',
        'page_size.number' => '每页显示条目数必须是整数类型',
        'id.require' => '模板id必填',
        'id.number' => '模板id必须是整数类型',
    ];

    //验证场景
    protected $scene = [
        'getPaginateList' => ['page_no', 'page_size'],
        'immediateUse' => ['id']
    ];

}